﻿using System;
using System.Collections.ObjectModel;
using Coniometer.Model;
using Prism.Mvvm;

namespace Coniometer.ViewModels
{
    public class SopDataPageViewModel : BindableBase
    {
        private ObservableCollection<SopDataModel> _sopDataCollection = new ObservableCollection<SopDataModel>();

        public ObservableCollection<SopDataModel> SopDataCollection
        {
            get => _sopDataCollection;
            set
            {
                _sopDataCollection = value;
                RaisePropertyChanged();
            }
        }

        public SopDataPageViewModel()
        {
            for (var i = 1; i < 15; i++)
            {
                var dataModel = new SopDataModel
                {
                    IsSelected = true,
                    Index = i.ToString(),
                    Time = "2019/05/01 09:00:00",
                    Region = "生产一区",
                    Area = "灌装间",
                    User = "hiuojoijki",
                    Result = "查看详情"
                };
                SopDataCollection.Add(dataModel);
            }
        }
    }
}